package com.twu.biblioteca;

/**
 * Created by jrocha on 10/2/14.
 */
public class User {
    public User(String login, String password, String name, String email, String telephoneNumber) {
        this.libraryNumber = login;
        this.password = password;
        this.name = name;
        this.email = email;
        this.telephoneNumber = telephoneNumber;
    }

    public boolean checkCredentials(String userLogin, String password){
        if(userLogin.equals(getLibraryNumber()) && password.equals(getPassword())){
            return true;
        }

        return false;
    }

    public String getLibraryNumber(){
        return libraryNumber;
    }

    public String getPassword() {
        return password;
    }

    public String toString(){
        return "Nome: " + this.name + " - Email: " + this.email + " - Telephone Number: " + this.telephoneNumber;
    }

    private String libraryNumber;
    private String password;
    private String name;
    private String email;
    private String telephoneNumber;
}
